@extends('admin/layout/master')
@section('title', '标签修改')
@section('title2', '标签修改')

@section('action')
  <a class="layui-btn layui-btn-small layui-btn-normal usersAdd_btn" href="{{ url('admin/tag/index') }}"><i class="layui-icon"></i>标签列表</a>
	<!-- <a class="layui-btn layui-btn-small layui-btn-danger batchDel"><i class="layui-icon"></i>导出数据</a> -->
@endsection

@section('content')
<div class="error">
    @if (count($errors) > 0)
        <div class="alert alert-danger">
            错误列表：
            <ul>
                @foreach ($errors->all() as $error)
                    <li>{{ $error }}</li>
                @endforeach
            </ul>
        </div>
    @endif
</div>

<form class="layui-form" name="mainform" action="{{ url('/admin/tag/update', ['id'=>$olddata->id]) }}" method="post">
  <div class="layui-form-item">
    <label class="layui-form-label">标签名</label>
    <div class="layui-input-block">
      <input type="text" name="name" required  lay-verify="required" placeholder="请输入标签名" value="{{ $olddata->name }}" autocomplete="off" class="layui-input">
    </div>
  </div>
	<div class="layui-form-item">
	  <label class="layui-form-label">排序</label>
	  <div class="layui-input-block">
	    <input type="text" name="weight" placeholder="越大越前" value="{{ $olddata->weight }}" autocomplete="off" class="layui-input">
	  </div>
	</div>
  <div class="layui-form-item">
    <div class="layui-input-block">
      {{ csrf_field() }}
      <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
      <button type="reset" class="layui-btn layui-btn-primary">重置</button>
    </div>
  </div>
</form>
@endsection

@section('layuijs')
<script>
//一般直接写在一个js文件中
layui.use(['layer', 'form', 'upload'], function(){
var layer = layui.layer
,form = layui.form;
});
</script>
@endsection